package com.freewater.parking.infrastructure.config;

import com.freewater.parking.domain.blacklist.BlackListRepository;
import com.freewater.parking.domain.parking.FeeCalculator;
import com.freewater.parking.domain.parking.FeeCalculatorImpl;
import com.freewater.parking.domain.parking.ParkingService;
import com.freewater.parking.domain.parking.ParkingServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfiguration {

    @Bean
    public ParkingService parkingService(BlackListRepository blackListRepository,
                                         FeeCalculator feeCalculator) {
        return new ParkingServiceImpl(blackListRepository, feeCalculator);
    }

    @Bean
    public FeeCalculator parkingFeeService() {
        return new FeeCalculatorImpl();
    }
}
